import {defineConfig} from 'vite'
import vue from '@vitejs/plugin-vue'


export default defineConfig(({command, mode}) => {
  console.log('command, mode', command, mode)
  // command server build
  if (command == 'serve') {
    return {
      server: {
        port: 3000
      },
      plugins: [vue()]
    }
  } else {
    return {
      build: {
        outDir: "dist",
      },
      plugins: [vue()]
    }
  }
})
